Decoding errors using quantum subspace expansion

ABSTRACT

Methods, systems and apparatus for correcting a result of a quantum computation. In one aspect, a method includes selecting a quantum error correcting code for the quantum computation, wherein the quantum error correcting code is defined by multiple stabilizer generators; determining a set of symmetry operators, comprising: selecting a subset of the stabilizer generators, determining, for each selected stabilizer generator, a sum between an identity operator and the stabilizer generator, and multiplying the determined sums together to form a summation of terms, wherein each term in the summation is equal to a respective symmetry operator; measuring a projective correction of a physical observable over an output quantum state of the quantum computation using the determined set of symmetry operators, wherein the physical observable corresponds to the result of the quantum computation; and determining a corrected result of the quantum computation using the measured projective correction of the physical observable.

BACKGROUND

This specification relates to quantum computing.

Quantum error correction codes are used in quantum computing to protect quantum information from errors due to decoherence and other quantum noise. Some quantum error correction codes employ syndrome measurements to diagnose errors that corrupt a quantum state. Syndrome measurements are multi-qubit measurements of respective check operators that do not disturb the quantum information in the encoded state. The outcome of a syndrome measurement—the error syndrome—can be used as a part of a fast feedback mechanism to decode and recover from the error. For example, a unitary recovery operator can be applied to the quantum state conditioned on the error syndrome to stop errors propagating through the computation.

SUMMARY

This specification describes methods and systems for mitigating and decoding errors on logical qubits using a post processing technique based on quantum subspace expansions.

In general, one innovative aspect of the subject matter described in this specification can be implemented in a method for correcting a result of a quantum computation, the method comprising: selecting a quantum error correcting code to perform the quantum computation, wherein the quantum error correcting code is defined by a respective set of stabilizer generators; determining a set of symmetry operators, comprising: selecting a subset of the set of stabilizer generators; determining, for each stabilizer generator in the selected subset, a sum between an identity operator and the stabilizer generator; and multiplying the determined sums together to form a summation of terms, wherein each term in the summation is equal to a respective symmetry operator; measuring a projective correction of a physical observable over an output quantum state of the quantum computation using the determined set of symmetry operators, wherein the physical observable corresponds to the result of the quantum computation; and determining a corrected result of the quantum computation using the measured projective correction of the physical observable.

Other implementations of these aspects includes corresponding computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the methods. A system of one or more classical and/or quantum computers can be configured to perform particular operations or actions by virtue of having software, firmware, hardware, or a combination thereof installed on the system that in operation causes or cause the system to perform the actions. One or more computer programs can be configured to perform particular operations or actions by virtue of including instructions that, when executed by data processing apparatus, cause the apparatus to perform the actions.

The foregoing and other implementations can each optionally include one or more of the following features, alone or in combination. In some implementations measuring the projective correction of a physical observable over an output quantum state of the quantum computation using the determined set of symmetry operators comprises measuring P ^(†)ΓP where P represents a summation of the symmetry operators in the determined set of symmetry operators with uniform coefficients, and Γ represents the physical observable.

In some implementations measuring a projective correction of a physical observable over an output quantum state of the quantum computation using the determined set of symmetry operators comprises: selecting one or more pairs of operators, wherein each pair comprises i) a respective component of the physical observable, and ii) a respective symmetry operator from the determined set of symmetry operators; for each selected pair of operators: performing the quantum computation on an initial quantum state to obtain the output quantum state, and measuring the selected pair of operators over the output quantum state to obtain a respective measurement result.

In some implementations determining a corrected result of the output of the quantum computation comprises determining a corrected result of the output of the quantum computation using the obtained measurement results.

In some implementations determining a corrected result of the output of the quantum computation using the obtained measurement results comprises computing a linear combination of the obtained measurement results.

In some implementations selecting one or more pairs of operators comprises randomly sampling one or more pairs of operators according to a stochastic sampling scheme.

In some implementations the result of the quantum computation comprises an expectation value of the physical observable.

In some implementations the physical observable comprises a weighted sum of Pauli operators, and wherein components of the physical observable comprise Pauli operators in the sum of Pauli operators.

In some implementations measuring a selected pair of operators over the output quantum state to obtain a respective measurement result comprises measuring Γ_(j)M_(k) over the output quantum state, wherein Γ_(j) represents the component of the physical observable in the selected pair and M_(k) represents the symmetry operator in the selected pair.

In some implementations the size of the selected subset of the set of stabilizer generators is dependent on one or more of i) a target computation accuracy, or ii) a target computation cost.

In some implementations the quantum code comprises a stabilizer code, surface code, the Shor code, the Bacon-Shor code, or toric code.

In some implementations the quantum computation is performed using a noisy intermediate scale quantum computer.

In general, another innovative aspect of the subject matter described in this specification can be implemented in a method for correcting a result of a quantum computation, the method comprising: selecting a quantum error correcting code to perform the quantum computation, wherein the quantum error correcting code is defined by a respective set of stabilizer generators; selecting a linear combination of stabilizer operators generated by the stabilizer generators; determining values of coefficients of the stabilizer operators in the linear combination, comprising solving a generalized eigenvalue problem for a corresponding quantum error correcting code Hamiltonian; measuring an expansion correction of a physical observable over an output quantum state of the quantum computation using the stabilizer operators in the linear combination of stabilizer operators, wherein the physical observable corresponds to the result of the quantum computation; and determining a corrected result of the quantum computation using the measured expansion correction of the physical observable and the determined values of the coefficients of the stabilizer operators in the linear combination.

Other implementations of these aspects includes corresponding computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the methods. A system of one or more classical and/or quantum computers can be configured to perform particular operations or actions by virtue of having software, firmware, hardware, or a combination thereof installed on the system that in operation causes or cause the system to perform the actions. One or more computer programs can be configured to perform particular operations or actions by virtue of including instructions that, when executed by data processing apparatus, cause the apparatus to perform the actions.

The foregoing and other implementations can each optionally include one or more of the following features, alone or in combination. In some implementations solving the generalized eigenvalue problem comprises: preparing multiple copies of an output quantum state of the quantum computation; measuring components of the quantum error correcting code Hamiltonian over respective copies of the output quantum state; measuring components of an overlap matrix for the stabilizer operators over respective copies of the output quantum state; determining a matrix of eigenvalues and a matrix of eigenvectors using the measured components of the quantum error correcting code Hamiltonian and measured components of an overlap matrix for the stabilizer operators.

In some implementations measuring an expansion correction of a physical observable over an output quantum state of the quantum computation using the stabilizer operators in the linear combination of stabilizer operators comprises measuring respective M_(i) ^(†)ΓM_(j) over the output quantum state to obtain corresponding measurement results, wherein F represents the physical observable and M_(k) represents a stabilizer operator.

In some implementations determining a corrected result of the quantum computation using the measured expansion correction of the physical observable and the determined values of the coefficients of the stabilizer operators in the linear combination comprises: summing the measurement results, wherein each measurement result in the sum is multiplied by a respective determined coefficient.

In some implementations the result of the quantum computation comprises an expectation value of the physical observable.

In some implementations the physical observable comprises a weighted sum of Pauli operators, and wherein components of the physical observable comprise Pauli operators in the sum of Pauli operators.

In some implementations the quantum code comprises a stabilizer code, surface code, the Shor code, the Bacon-Shor code, or toric code.

In some implementations the quantum computation is performed using a noisy intermediate scale quantum computer.

In general, another innovative aspect of the subject matter described in this specification can be implemented in a method for correcting a result of a quantum computation represented by a problem Hamiltonian, the method comprising: identifying a set of known symmetry operators for the problem Hamiltonian; generating a set of expansion operators, comprising: for each symmetry operator, determining a sum between the identity operator and the symmetric operator; and multiplying the determined sums together to form a summation of terms, wherein each term in the summation is equal to a respective expansion operator; measuring matrix elements of some or all of the expansion operators in the generated set; and determining corrected values of an output of the quantum computation using the measured matrix elements.

Other implementations of these aspects includes corresponding computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the methods. A system of one or more classical and/or quantum computers can be configured to perform particular operations or actions by virtue of having software, firmware, hardware, or a combination thereof installed on the system that in operation causes or cause the system to perform the actions. One or more computer programs can be configured to perform particular operations or actions by virtue of including instructions that, when executed by data processing apparatus, cause the apparatus to perform the actions.

The foregoing and other implementations can each optionally include one or more of the following features, alone or in combination. In some implementations the symmetry operators in the identified set of approximate symmetry operators comprise operators that do not commute with the problem Hamiltonian.

In some implementations the set of known symmetry operators comprise operators with two distinct eigenvalues.

In some implementations the method further comprises identifying a set of approximate symmetry operators for the problem, and wherein generating a set of expansion operators comprises: for each symmetry operator and for each approximate symmetry operators, determining a sum between the identity operator and the symmetric operator or approximate symmetry operator; and multiplying the determined sums together to form a summation of terms, wherein each term in the summation is equal to a respective expansion operator.

The subject matter described in this specification can be implemented in particular ways so as to realize one or more of the following advantages.

A system implementing the decoding techniques described in this specification can reduce errors in quantum computations to increase the accuracy of the quantum computations. For example, the presently described techniques can be used to mitigate errors and increase the accuracy of quantum computations in near-term applications of quantum computing such as quantum chemistry or general quantum circuits. In addition, the techniques described in this specification do not require strict stabilizer measurements, easing the resource and control requirements for non-local measurements, and do not require a feed-forward mechanism. The complexity of operations required to perform quantum computations with reduced errors and improved accuracy is therefore also reduced.

In addition, the presently described techniques can be used to optimize quantum codes on quantum devices to increase the performance of the quantum device. It has been conjectured that one of the best uses of early quantum devices may be to tune quantum error correcting codes under actual device conditions. The modeling of true noise within the device is incredibly difficult as the system size grows, and studying which codes excel under natural conditions and how to optimize them may lead to progress towards fully fault tolerant computation. Indeed, knowledge of biased noise sources can vastly increase the threshold of a given code. The techniques described in this specification provide a method to experimentally study the encoding through post-processing while removing the complication of fault-tolerant syndrome measurement or fast feedback. This allows for the exploration of a wider variety of codes experimentally before worrying about these final details. It is possible to run simple gate sequences in the logical space with known results, and use the post processing decoder described herein to study the decay of errors as stabilizers are added. This limit will inform the propagation of logical errors in the system and allow code optimizations to be made—before full fault tolerant protocols are available.

The decoding techniques described in this specification benefits greatly from the fact that check measurements need not be geometrically local to be implementable in a realistic setting. This allows for codes that are not geometrically local on the architecture in use to be explored and utilized, which may have improved properties with respect to distance and rate than geometrically local codes. Moreover, they naturally allow implementation of recent fermionic based codes, such as Majorana loop stabilizer codes or variations of Bravyi-Kitaev superfast thought to be good candidates for near-term simulations, without the need for complicated decoding circuits or ancilla for syndrome measurements.

Moreover, since the method proposed in this specification is a post-processing method, it is entirely compatible with extrapolation techniques introduced for error mitigation. In these techniques, additional noise is artificially introduced to extrapolate to a lower noise limit.

The method for mitigating errors and studying error correcting codes described in this specification can be implemented to achieve a pseudo-threshold of p≈0.60 under a depolarizing channel in the [[5; 1; 3]] code. The method has the potential to play a role in the development and optimization of quantum codes under realistic noise conditions as well as the ability to remove errors from early application initiatives.

The techniques described in this specification can be applied to computational problems encoded using a quantum code, but can also be generalized to non-encoded problems through the use of physical symmetries, approximate symmetries, non-commuting operators, or non-symmetries. In some cases, e.g., when they are available, physical symmetries or approximate symmetries may also be used to improve the efficiency and/or accuracy of the decoding techniques described in this specification for encoded problems, too.

The details of one or more implementations of the subject matter of this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts an example system for performing a quantum computation with reduced errors.

FIG. 2A is a flow diagram of a first example process for performing a quantum computation with reduced errors using stochastic subspace expansion.

FIG. 2B shows an algorithmic schematic performing a quantum computation with reduced errors using stochastic subspace expansion.

FIG. 3A is a flow diagram of an example process for performing a quantum computation with reduced errors using deterministic subspace expansion.

FIG. 3B shows an algorithmic schematic performing a quantum computation with reduced errors using deterministic subspace expansion.

FIG. 4 is a flow diagram of an example process for performing a quantum computation in the space of a problem Hamiltonian.

Like reference numbers and designations in the various drawings indicate like elements.

DETAILED DESCRIPTION Overview

This specification describes techniques for mitigating errors on quantum codes that are capable of mitigating errors on encoded logical qubits using efficient classical post-processing with no complicated syndrome measurements or additional qubits beyond those used for the logical qubits. This greatly simplifies the experimental exploration of quantum codes on near-term devices, removing the need for locality of syndromes or fast feed-forward, allowing the performance aspects of codes to be studied on real devices.

The techniques include a general construction that uses projectors from quantum error correcting codes to correct observables in post processing. This construction can also be extended to approximate projectors within a subspace. The construction then allows for a generalization to the correction of some logical errors in the code space, corrections on physical un-encoded Hamiltonians without engineered symmetries, the use of symmetries where the desired quantum number is not known, and corrections derived from approximate symmetries.

Example Hardware

FIG. 1 depicts an example quantum computing system 100. The example system 100 is an example of a system implemented as classical and quantum computer programs on one or more classical computers and quantum computing devices in one or more locations, in which the systems, components, and techniques described below can be implemented.

The system 100 includes quantum hardware 102 in data communication with a classical processor 104. For convenience, the classical processor 104 and quantum computing hardware 102 are illustrated as separate entities, however in some implementations the classical processor 104 can be included in quantum computing hardware 102, e.g., the quantum computing hardware 102 can include one or more components for performing classical computing operations.

The system 100 is configured to perform classical computations in combination with quantum computations using quantum hardware 102 and classical processors 104. For example, the system may be configured to perform operations according to the example processes 200, 300 and 400 described below with reference to FIGS. 2A, 3A and 4.

The quantum hardware 102 includes multiple qubits 110 and control devices 112 for controlling the qubits 110 and causing algorithmic operations or quantum computations to be performed.

The qubits 110 are physical qubits, e.g., physical devices that behave as two-state quantum systems, that are used to perform algorithmic operations or quantum computations. Since physical qubits can be susceptible to decoherence and other sources of error, multiple physical qubits can be used to create a single logical qubit that performs as specified in a quantum algorithm or circuit. For example, in the stabilizer quantum error correcting code, logical qubits are groups of physical qubits that use redundancy through symmetry to protect information e.g., the five qubit [[5, 1, 3]] stabilizer error correcting code is a distance 3 code that encodes 1 logical qubit into 5 physical qubits and protects against arbitrary single qubit errors.

The specific physical realization of the qubits 110 included in the quantum computing hardware 102 and how they interact with one another is dependent on a variety of factors including the type of quantum computations that the quantum computing hardware 102 is performing. For example, in some implementations the qubits may include qubits that are physically realized via atomic, molecular or solid-state quantum systems. In other implementations the qubits may include superconducting qubits, e.g., Gmon qubits, or semi-conducting qubits. In other implementations ion traps, photonic devices or superconducting cavities (with which states may be prepared without requiring qubits) may be used. Further examples of physical realizations of qubits include fluxmon qubits, silicon quantum dots or phosphorus impurity qubits.

The type of control devices 112 included in the quantum hardware 102 depends on the type of qubits 110 included in the quantum hardware 102. For example, in some cases the qubits 110 can be frequency tunable. In these cases, each qubit may have associated operating frequencies that can be adjusted using one or more control devices 112, e.g., an excitation pulse generator and control lines that couple the qubits to the excitation pulse generator. Example operating frequencies include qubit idling frequencies, qubit interaction frequencies, and qubit readout frequencies. Different frequencies correspond to different operations that the qubit can perform. For example, setting the operating frequency to a corresponding idling frequency may put the qubit into a state where it does not strongly interact with other qubits, and where it may be used to perform single-qubit gates. As another example, in cases where qubits interact via couplers with fixed coupling, qubits can be configured to interact with one another by setting their respective operating frequencies at some gate-dependent frequency detuning from their common interaction frequency. In other cases, e.g., when the qubits interact via tunable couplers, qubits can be configured to interact with one another by setting the parameters of their respective couplers to enable interactions between the qubits and then by setting the qubit's respective operating frequencies at some gate-dependent frequency detuning from their common interaction frequency. Such interactions may be performed in order to perform multi-qubit gates.

The control devices 112 may further include devices, e.g., readout resonators, that are configured to perform measurements on the qubits 110 and provide measurement results to the classical processors 104 for processing and analyzing. For example, the control devices 112 may include devices configured to perform measurements of a physical observable, F, on one or more of the physical qubits 110. Furthermore, the control devices 112 may include devices configured to perform measurements of a projective correction of a physical observable, P ^(†)ΓP, on one or more of the physical qubits 110 based on a set of determined projection operators, as described below in relation to FIGS. 2-4.

The classical processor 104 includes components for performing classical computation, e.g., the classical post-processing procedures described in this specification.

Programming the Hardware: Correcting Logical Observables in Post-Processing

FIG. 2A is a flow diagram of an example process 200 for performing a quantum computation with reduced errors using stochastic subspace expansion. For convenience, the process 200 will be described as being performed by a system of one or more classical or quantum computing devices located in one or more locations. For example, a quantum computation system, e.g., the system 100 of FIG. 1, appropriately programmed in accordance with this specification, can perform the process 200.

The system selects a quantum error correcting code to perform the quantum computation (step 202). For a system of n physical qubits, quantum error correcting codes utilize entanglement to encode a set of k<n logical qubits to improve robustness to probable errors. A code that requires at least a weight d Pauli operator to induce a logical error is said to have distance d. The three numbers n, k, d can be used to define a quantum error correcting code, with the notation [[n, k, d]]. A set of 2k logical operators formally written

={X _(i), Z _(i)}_(i=1, 2, . . . k) perform target Pauli operations (as part of the selected error corrected code) on states in the code space, which is the ground state subspace of a code Hamiltonian corresponding to the selected quantum error correcting code. The ground state subspace of the code Hamiltonian can be given by

c = - ⁢ ⁢ M i ( 1 )

where

represents a set of check operators drawn from a stabilizer group that can be used to deduce error syndromes. More explicitly,

represents the set of stabilizer generators and S represents the full stabilizer group implying S⊆

⊆

, such that the minimal set of check operators is the stabilizer generators, but additional operators from the stabilizer group may be added, e.g., as in single shot error correction techniques. The quantum error correcting code selected by the system can therefore be defined by the set of stabilizer generators

. In some implementations, the selection of the quantum error correction code may be performed by the classical processors of the system.

Example quantum codes include general stabilizer codes, surface codes, the Shor code, Bacon-Shor codes, or toric codes. Selecting the quantum code can also include selecting properties of the quantum code, e.g., how many qubits to use in the encoding or how logical errors can occur. For example, if the system selects the surface code then the number of qubits used to encode a logical qubit (which determines the code distance) may also be selected. As another example, if the system selects the surface code, then the number of errors that have to occur in the physical system to incur a logical error may also be selected. As another example, the system may select a quantum code and a level of concatenation, i.e., how many times the code is chained together to increase robustness. Selecting a quantum code and properties if the quantum code may also determine how the physical qubits will be laid out on the quantum device. Therefore, the specific quantum code and code properties selected by the system may depend on several factors including the type, size and structure of the quantum device performing the quantum computation and the type of quantum computation being performed.

Traditional error correction proceeds by measuring the check operators, e.g., using ancillary qubits, and using resulting syndrome information to decode and recover from the error. However, in some implementations it may not be possible to perform such on-the-fly measurement, decoding, and recovery, e.g., when performing quantum computations using NISQ devices. In such implementations projection operators are used to remove errors from a quantum state.

The system determines a set of symmetry operators (step 204). The symmetry operators are determined using the stabilizer formalism and projection operators. Members of the stabilizer group S_(i) ∈

have eigenvalues ±1 and can each be used to construct a respective projector P_(i)=(

+S_(i))/2 that removes components of the state outside the +1 eigenspace of the stabilizers or code space. This can be used to construct a projector that is a linear combination of symmetries (which in turn is based on a product of projection operators/projectors) to remove target errors outside the code space. However, this cannot remove logical errors made within the code space. Quantum error detection typically discards results based on syndrome measurements without using error correction. However, as described in more details below, the techniques described in this specification avoid the need for direct syndrome measurements—which can be cumbersome on geometrically local qubit layouts and are challenging to perform in a fault tolerant fashion for complex codes. In some implementations, the set of symmetry operators may be determined by the classical processors of the system.

For a stabilizer group with generators S_(i), a complete projector can be formed from Π_(s) _(i) _(∈s)½(

+S_(i))=Σ_(i)M_(i). When taken over all the generators, the expression Σ_(i)M_(i) is the sum of all elements of the stabilizer group with a constant coefficient, which can be fixed to ½^(m) to obtain

$\begin{matrix} {\overset{¯}{P} = {{\overset{¯}{P}}^{\dagger} = {{\prod\limits_{i}^{m}P_{i}} = {\frac{1}{2^{m}}\mspace{11mu} M_{i}}}}} & (2) \end{matrix}$

where m represents the number of stabilizer generators used. For the case of full projection, this will be the full stabilizer group which contains 2^(m) terms. While this is generally an exponential number of terms, the number of terms is not an explicit factor in the cost when a stochastic sampling scheme is used to apply the corrections, as described in more detail below. Rather, the correction cost will depend on the volume of the state outside the code space. The group structure allows for projective correction of the density matrix P _(ρ) P ^(†) on a noisy intermediate-scale quantum computing device.

In other words, to generate the set of symmetry operators, the system selects a subset of m stabilizer generators, and determines, for each stabilizer generator in the selected subset, a sum (or difference) between the identity operator and the stabilizer generator. The determined sums (or differences) are then multiplied together to form a summation of terms, wherein each term in the summation is equal to a respective symmetry operator. Expansion of Equation (2) generates the set of symmetry operators. For example, if the selected subset of the set of stabilizer generators includes two stabilizer generators S₁, S₂, then the sums (I+S₁) and (I+S₂) are multiplied together to form the summation (I+S₁) (I+S₂)=I+S₁+S₂+S₁S₂ where each term I, S₁, S₂, S₁S₂ is equal to a respective symmetry operator M_(i).

In some implementations the system may determine a sum as opposed to a difference between the identity operator and the stabilizer generator, as this eliminates the things in the −1 eigenspace of the stabilizer. However, in other implementations the system may determine the difference.

The size m of the selected subset of the set of stabilizer generators is dependent on a variety of factors. For example, the size of the selected subset may depend on a target accuracy or a target measurement and circuit repetition cost. For example, in some cases the number of terms that can be efficiently measured in real time may be limited. A larger subset will typically yield a more accurate solution, but will have a higher measurement and circuit repetition cost.

Whilst the above described symmetry operators are exponential in number, they provide several technical advantages, e.g., as opposed to traditional measurement of stabilizer generators which may not be exponential in number. Example process 200 uses transversal, destructive measurement to avoid the need for measurement syndrome qubits and associated fault-tolerant gadgets. As such, whilst stabilizer generators commute, transversal measurement of their components may not. For example, while X₁X₂ and Z₁Z₂ commute, measurement of Z₁ and Z₂ transversally to determine Z₁Z₂ destroys the ability to recover X₁X₂. The presently described techniques allow this difficulty to be bypassed through stochastic operator sampling and works with codes of arbitrary structure. This transversal measurement scheme that avoids the need for ancilla provides a relatively high pseudo threshold for a given code.

The system measures a projective correction of a physical observable over an output quantum state of the quantum computation using the determined set of symmetry operators (step 206). The measurement may be performed by control devices of the quantum hardware on one or more of the qubits of the quantum hardware. The system uses the measured projective correction of the physical observable to determine a corrected result of the quantum computation (step 208). In some implementations, the corrected result may be determined by the classical processors of the system. The corrected result may be output by the system and/or used as input for a further classical and/or quantum computation.

For example, the output of the quantum computation may be obtained by determining an expectation value

Γ

of a physical observable Γ. Therefore, to determine a corrected value of the output of the quantum computation, the system can perform repeated state preparation (perform the quantum computation on an initial encoded quantum state to obtain an output quantum state ρ) and measurement of the prepared state according to the Equations (3) and (4) below, where P ^(†)ΓP represents the projective correction of the physical observable.

$\begin{matrix} \begin{matrix} {\left\langle \Gamma \right\rangle = {{\frac{1}{c}{{Tr}\left\lbrack {{\overset{\_}{P}}_{\rho}{\overset{\_}{P}}^{\dagger}\Gamma} \right\rbrack}} = {\frac{1}{c}{{Tr}\left\lbrack {\rho\left( {{\overset{\_}{P}}^{\dagger}\Gamma\overset{\_}{P}} \right)} \right\rbrack}}}} \\ {= {\frac{1}{c\; 2^{2\; m}}{\sum\limits_{ijk}{\gamma_{j}{{Tr}\left\lbrack {\rho\; M_{i}^{\dagger}\Gamma_{j}M_{k}} \right\rbrack}}}}} \\ {= {\frac{1}{c\; 2^{m}}{\sum\limits_{jk}{\gamma_{j}{{Tr}\left\lbrack {\rho\;\Gamma_{j}M_{k}} \right\rbrack}}}}} \end{matrix} & (3) \\ {c = {{{Tr}\left\lbrack {{\overset{\_}{P}}_{\rho}{\overset{\_}{P}}^{\dagger}} \right\rbrack} = {{Tr}\left\lbrack {\overset{\_}{P}}_{\rho} \right\rbrack}}} & (4) \end{matrix}$

In Equation (3), ρ represents the quantum state of the quantum system after the quantum computation has been performed, PρP ^(†) represents the expansion in a subspace around the quantum state p, F represents a logical Hermitian operator expressed as a sum of Pauli operators Γ_(i) as Γ=Σ_(i)γ_(i)Γ_(i), the operator Γ commutes with stabilizer group elements M_(i), and if M_(i) ^(†)M_(k) is in the selected set of operators, it can be rewritten as a single sum over these operators which will be repeated.

Repeated state preparation and measurement of the prepared state according to the Equations (3) and (4) can include: selecting one or more pairs of operators, wherein each pair comprises i) a respective component of the physical observable Γ₁, and ii) a respective symmetry operator M_(i) from the determined set of symmetry operators; for each selected pair of operators: performing the quantum computation on an initial (encoded logical) quantum state to obtain the output (encoded logical) quantum state, and measuring the selected pair of operators over the output quantum state ρ to obtain a respective measurement result. This process can be repeated multiple times to obtain averages over all the repetitions that represent measured values with a target accuracy. The respective measurement results can be summed to obtain a corrected result of the output of the quantum computation

Γ

.

Since the expansion of the summation in Equation (3) may contain a large number of terms, a stochastic scheme for sampling the corrections that maximizes efficiency can be implemented. In particular, running down the list of terms in the expansion of the summation and measuring each one to a fixed precision may have poor scaling. Instead, a scheme that reflects the fact that if the state ρ were completely contained in the code space, the measurement of c should be 1 and have 0 variance. This means that a reasonable stochastic sampling of terms should converge quickly, be less dependent on the actual number of terms, and depend on the quality of the state ρ.

An stochastic scheme for sampling these corrections and the associated cost of doing so is as follows. Projecting the logical operator Γ into the code space of the selected error correcting code gives

$\mu_{\Gamma} = {{T{r\left\lbrack {\overset{¯}{P}\rho{\overset{¯}{P}}^{\dagger}\Gamma} \right\rbrack}} = {\frac{\overset{˜}{\gamma}}{2^{m}}{\sum_{ij}{\gamma_{j}T{r\left\lbrack {\rho\Gamma_{j}M_{j}} \right\rbrack}}}}}$

where Γ={tilde over (γ)}Σ_(i)γ_(i)Γ_(i) with Σ_(i)γ_(i)=1 and γ_(i)≥0 from absorbing signs into Γ_(i). The terms on the right of this equation can be enumerated using bit strings χ=(χ₁, . . . , χ_(m)) to give

$\mu_{\Gamma} = {\overset{˜}{\gamma}{\sum_{\chi \in {\{{0,1}\}}^{m}}{\sum_{j}{\frac{\gamma_{j}}{2^{m}}\Gamma_{\chi,j}}}}}$

where Γ_(χ,j)=Tr[ρΓ_(j)S_(χ)] with S_(χ)=S₁ ^(χ) ¹ S₂ ^(χ) ² . . . S_(m) ^(χ) ^(m) . As described above, here it is assumed that each M_(j) is a symmetry of the encoding and commutes with the computation Hamiltonian and physical observables. To sample Tr[ρΓ_(j)S_(χ)] stochastically, the coefficients γ_(j) of the terms are used as a normalized probability distribution. In addition, the M_(i) can be sampled according to a uniform distribution or can be sampled according to an importance sampling scheme, where, based on a model of errors for the device, the probabilities of choosing certain symmetries M_(i) are intelligently weighted whilst measurement outcomes are corrected for the choice. Implementing an importance sampling scheme can lower the variance (and number of required quantum experiments) without biasing the result.

An example distinction between the measurement scheme described above with reference to Equations (3)-(4) and traditional error correction/detection is that syndrome measurements are not performed, and therefore additional ancilla qubits are not required. Whilst the traditional approach advantageously uses non-destructive measurements, it also has several disadvantages—in particular for near term implementations. For example, the traditional approach usually requires both more qubits and more non-locality. As another example, the traditional approach is less effective at detecting/correcting errors and has poor pseudo-thresholds. By removing the need for these syndrome measurements, as opposed to appending an operator and measuring all qubits independently, the regime of applicability is improved. For example, less accurate gates are required for the techniques to still be effective. In other words, in the measurement scheme described above with reference to Equations (3)-(4), stabilizers are not required to be measured “in earnest” because the techniques include a post-processing procedure—information in the state can be destroyed by measuring qubit-wise across Pauli operators. As an example, if the Pauli operator X₁Z₂Z₃X₄ is used a stabilizer, a true stabilizer measurement would require extracting only the ±1 measurement using an ancilla. However in the presently described scheme, repeated preparations of the state can be freely used and any unbiased estimator of

X₁Z₂Z₃X₄

can be constructed, including those which might destroy the encoded state. This dramatically simplifies the use of codes with non-local stabilizer measurements.

FIG. 2B shows an algorithmic schematic 250 of the example process 200 for performing a quantum computation with reduced errors using stochastic subspace expansion. As described above, an expansion in a subspace around a prepared quantum state ρ (e.g., an initial quantum code state or an initial quantum code state that has had some sequence of quantum gates applied to it) is used to improve the expected value of the logical observable

Γ

, without requiring ancilla based syndrome measurements or feedforward. An observable in the logical space Γ is expressed as a sum of Pauli operators, Γ_(k), while symmetries, M_(k) either naturally dictated by a system or from the stabilizer group S are selected. When using stochastic subspace expansion, terms from Equation (3) are randomly selected according to a stochastic sampling scheme, i.e., the operators {Γ_(j), M_(k)} are randomly selected according to the stochastic sampling scheme. For each selected term, the state ρ is prepared and the corresponding operators are measured using the state. The measurement results for each selected term are used to assemble the corrected expectation value

Γ

. The random sampling of terms, measurement and summation are repeated until an obtained corrected expectation value satisfies a convergence criterion.

Programming the Hardware: Relaxing Projectors to Subspace Expansions

FIG. 3A is a flow diagram of an example process 300 for performing a quantum computation with reduced errors using deterministic subspace expansion. For convenience, the process 300 will be described as being performed by a system of one or more classical or quantum computing devices located in one or more locations. For example, a quantum computation system, e.g., the system 100 of FIG. 1, appropriately programmed in accordance with this specification, can perform the process 300.

The system selects a quantum error correcting code to perform the quantum computation (step 302). Selecting a quantum error correcting code to perform a quantum computation is described in detail above with reference to step 202 of example process 200.

The system determines a set of stabilizer operators (step 304). Determining a set of stabilizer operators is described above with reference to step 204 of example process 200. In step 204 of example process 200, the system constructs symmetry operators from quantum error correcting codes. Step 304 of example process 300 is based on step 204 of example process 200, however in step 304 the projection operator construction is relaxed based on approximations of the projection operators within a subspace (the operators used to construct the stabilizer operators do not need to strictly be projectors, or if they are projectors they do not need to commute with the corresponding code Hamiltonian). Therefore, the projection operators are also referred to as expansion operators. This relaxation provides increased flexibility and power, because the relaxed construction minimizes errors variationally. This means the expansion operators can break a known symmetry in favor of a better solution in a respective metric, e.g., energy. For example, it may be possible to replace an unreliable qubit with a fixed value to minimize error automatically, but this is never an exact symmetry of the problem (unless the problem is trivial).

In more detail, in step 304, Equation (2) above is generalized. In Equation (2), the coefficients c_(i) are chosen to be uniform, i.e., c_(i)=½^(m). However if the series given by the RHS of Equation (2) is truncated according to a linear ansatz, this is no longer the case and the complete projector is given by the general expression:

$\begin{matrix} {{\overset{¯}{P}}_{c} = {\sum\limits_{i}^{L}{c_{i}M_{i}}}} & (5) \end{matrix}$

where L represents the number of terms in the linear ansatz and the stabilizer operators, M_(i) are elements of the stabilizer group as described above with reference to example process 200—however in Equation (5), unlike in Equation (2), it no longer needs to be true that P∝Π_(i)(

+S_(i)). Selecting a linear ansatz built from elements of the stabilizer group facilitates the inclusion of symmetries and guarantees the existence of an expansion operator for correcting observables during post processing.

Therefore, the system selects a linear ansatz by selecting a linear combination of stabilizer operators and determines values of corresponding coefficients c_(i). For example, the system can proceed as in step 204 of example process 200 and select a subset of m stabilizer generators for the quantum error correction code. The system can then truncate the selected subset of stabilizer generators. For example, the selected subset may be truncated in order to reduce costs associated with performing measurements. This can be achieved by identifying elements in the selected subset that do not contribute to the calculation as much as other terms, and removing these identified terms from the selected subset. For example, the system can select a group of operators M_(i) of fixed size, then iteratively: solve the generalized eigenvalue equation described below with reference to Equations (7)-(9) to determine corresponding coefficients c_(i) for the selected group, remove operators with determined coefficients that are smaller than a predetermined threshold, e.g., smaller than 10⁻³, and add new operators M_(i) to the group to generate a new group of the fixed size. This iterative process can be repeated until a group of operators with large enough coefficients is found.

The task of determining the coefficients c_(i) can be formulated as the task of minimizing the distance to the code space subject to a normalization constraint. Using the Hamiltonian formulation of the code space, this is equivalent to approximating the ground state of the code space by

$\begin{matrix} {{\min\limits_{c_{i}}\mspace{11mu}{{Tr}\left\lbrack {{\overset{\_}{P}}_{c}\rho\;{\overset{\_}{P}}_{c}^{\dagger}H_{c}} \right\rbrack}}{{{such}\mspace{14mu}{that}\mspace{14mu}{{Tr}\left\lbrack {{\overset{\_}{P}}_{c}\rho\;{\overset{\_}{P}}_{c}^{\dagger}} \right\rbrack}} = 1}{{\overset{¯}{P}}_{c} = {\sum\limits_{i}^{\;}{c_{i}M_{i}}}}} & (6) \end{matrix}$

This optimization is dependent both on the state ρ and choice of H_(c) in general. From the linear ansatz and normalization constraint, this problem is equivalent to the minimization of a quadratic form on the surface of a sphere with a non-orthogonal metric. The solution to this problem is given by the solution to the generalized eigenvalue problem given in Equations (7)-(9) below.

HC=SCE  (7)

H _(ij) =Tr[M _(i) ^(†) H _(c) M _(j)ρ]  (8)

S _(ij) =Tr[M _(i) ^(†) M _(j)ρ]  (9)

In Equations (7)-(9), H represents the action of the code Hamiltonian in this stabilizer projector basis, the matrix S is an overlap or metric matrix defining the subspace geometry, C represents a matrix of eigenvectors, and E represents a diagonal matrix of eigenvalues. The column of C that corresponds to the lowest value of the diagonal matrix E contains the coefficients c_(i). In other words, the columns of C represent the eigenvectors, and the eigenvector associated with the lowest eigenvalue (e.g., ground state) has entries which represent the c_(i). For example, if Equations (7)-(9) are solved using a solver that produces ordered eigenvectors, the coefficients are contained in the first column of C. For cases where the stabilizer operators M_(i) are built from projectors from generators, the solutions coincide with the solutions obtained using example process 200. In other cases, an optimal solution that interpolates between different numbers of projectors in the subspace given is obtained. This type of expansion about a state can be referred to as a quantum subspace expansion (QSE). The ground state eigenvector of this N_(M)×N_(M) eigenvalue problem forms the optimal solution of the above problem within this subspace. In some cases the optimal solution of this eigenvalue problem may not be a strict projector. However, this is not necessarily undesirable. For example, in some cases, a lower energy state may be found for a specific problem Hamiltonian that corresponds to a rotation in the logical space.

The system measures an expansion correction P _(c) ^(†)ΓP _(c) of a physical observable Γ over an output quantum state ρ of the quantum computation using the stabilizer operators in the linear combination of stabilizer operators, where the physical observable corresponds to the result of the quantum computation (step 306). Measuring an expansion correction of a physical observable over an output quantum state of the quantum computation using the stabilizer operators in the linear combination of stabilizer operators includes measuring respective M_(i) ^(†)ΓM_(j) over the output quantum state to obtain corresponding measurement results, where F represents the physical observable and M_(k) represents a stabilizer operator.

The system determines a corrected result of the quantum computation using the measured expansion correction of the physical observable and the determined values of the coefficients of the stabilizer operators in the linear combination (step 308). Determining a corrected result of an output of a quantum computation with fixed c_(i) is described above with reference to step 206 of example process 200. For example, the system sums the measurement results obtained by measuring each M_(i) ^(†)ΓM_(j), where each measurement result is multiplied by a respective coefficient as determined by solving the generalized eigenvalue problem. Alternatively, the system may use the determined coefficients to build a representation of an operator in the same basis defined by the expansion operator, and use it to perform further symmetry projections or improve the estimate of a logical observable.

As in conventional quantum error correction, the degeneracy of the ground state of the full code Hamiltonian prevents referencing a single state within the code space. This makes removing logical errors with the above procedure impossible. However, when considered in conjunction with a problem Hamiltonian such as that from a quantum physical system like an electronic system, it becomes possible to correct logical errors as well if the goal is to prepare an eigenstate of this Hamiltonian or minimize its energy. As an example, given a single encoded spin with a problem Hamiltonian −Z_(i) where the state is incorrectly found in |1

, by including as an expansion operator X, an error in the logical space can be corrected with this procedure, as the lower energy state, |0

will be detected as being in the expanded subspace.

FIG. 3B shows an algorithmic schematic 350 of example process 300 for performing a quantum computation with reduced errors using deterministic subspace expansion. As described above, an expansion in a subspace around a prepared quantum state ρ is used to improve the expected value of the logical observable

Γ

, without requiring ancilla based syndrome measurements or feedforward. An observable in the logical space Γ is expressed as a sum of Pauli operators, Γ_(k), while symmetries, M_(k), either naturally dictated by a system or from the stabilizer group S are selected. When using deterministic subspace expansion, the set of M_(k) is expanded to include non-symmetries (i.e., P is no longer necessarily proportional to Π_(i)(

+S_(i))), and the corresponding expectation values over ρ can be evaluated with many repetitions to form representations of the operators in the subspace around ρ. These matrices define a generalized eigenvalue problem whose solution, C, defines both an optimal projector P _(c) in the basis of operators M_(i) and corrected expectation values

Γ

for target observables.

Programming the Hardware: Corrections with Un-Encoded Systems

Example processes 200 and 300 of FIGS. 2A and 3A, respectively, describe decoding within an error correcting code that redundantly encodes quantum information via engineered symmetries. However, this strategy involves some overhead due to the encoding in the execution of gates. In some near-term experiments, it may be more practical to work directly in the space of a physical problem Hamiltonian H_(p).

FIG. 4 is a flow diagram of an example process 400 for performing a quantum computation in the space of a problem Hamiltonian. For convenience, the process 400 will be described as being performed by a system of one or more classical or quantum computing devices located in one or more locations. For example, a quantum computation system, e.g., the system 100 of FIG. 1, appropriately programmed in accordance with this specification, can perform the process 400.

The system identifies a set of known symmetry operators for the problem Hamiltonian (step 402 a). These known symmetry operators may be known in advance, or may be determined using special purpose algorithms. For example, in the case of an interacting fermion system, the identified set of symmetry operators can include one or more of the total number of fermions, the total spin and S_(z) component, or symmetries related to spatial degrees of freedom in the system. In some implementations, the symmetry operators may be determined by the classical processors of the system. In some implementations, the symmetry operators may be received as and/or determined from input to the system.

In some implementations the symmetry operators in the identified set may include operators with only two distinct eigenvalues, also referred to as

₂ symmetries of the problem Hamiltonian. Selecting such symmetry operators can reduce the costs associated with implementing the operators. For example, the problem of number symmetry in a fermion Hamiltonian can take eigenvalues that range from 0 to the number of spin orbitals in the system. Therefore, to select the correct particle number, a projector that removes all the components except the desired particle number N_(p) or ∝Σ_(n≠N) _(p) (n−{circumflex over (N)}) where {circumflex over (N)} represents the number operator on all fermionic modes of the system. This can result in a large number of terms which is expensive to implement, e.g., requiring more qubits, additional gate depth or increased computational efficiency. Example

₂ symmetries include the number symmetry operator, which in the Jordan-Wigner representation takes the form Π_(i)Z_(i), or the up-spin (α) and down-spin (β) number parities Π_(i∈a) Z_(i) and Π_(i∈β) Z_(i). These operators generate the full number parity and offer additional power in their projection.

The system generates one or more projection/expansion operators (as described at step 204 of example process 200 or step 304 of example process 300) using the symmetry operators (step 404). For example, identified

₂ symmetries can be used in place of the stabilizer generators S_(i) (which can generate the operators M_(i)).

In cases where the system identifies a symmetry operator at step 402 a but the symmetry subspace to which the target state belongs is unknown, it will be selected automatically. For example, in the case where the system selects a

₂ symmetry F of the Hamiltonian H_(p), defined by [H_(p),F]=0, but it is not known which of the two eigenspaces the exact ground state belongs to, applying P_(F) ⁺=(

+F) or P_(F) ⁻=(

−F) can lead to different results. Concatenations with other symmetries can compound this problem. However the presently described QSE procedure can automatically select between the two to find the optimal choice.

Because of this property, the system can also identify a set of approximate symmetry operators for the problem Hamiltonian or more generally operators that do not commute with the Hamiltonian but have known structure with regards to the problem at step 402 a (step 402 b). For example, for the local fermion occupation operator a_(i) ^(†)a_(i), which under the Jordan-Wigner transformation is given by Z_(i), it is expected that [H_(p), Z_(i)]≠0 and for the exact state to have some component on orbital i. However, the sites in fermionic simulation problems are often approximately well-ordered in terms of both energy and likely occupation in the so-called natural orbital basis. This means that some sites are less likely to be occupied than others, and they can inflict disproportionately large energetic errors compared to similar errors on other sites. The QSE procedure can automatically decide whether to apply the projector (

+Z_(i)) by balancing the contribution of site i to the exact wavefunction against the energetic damage incurred by its extra occupation under noise in this example. While this particular projector is simple enough that it is tantamount to a removal of a qubit when applied exactly, one can imagine pair occupation projectors on the highest energy orbitals, such as (

+Z_(i)Z_(j)) can be effective in removing errors that caused by erroneous occupation of the highest energy orbitals which cannot be mitigated by simple truncation of a qubit.

The system determines matrix elements of some or all of the projection/expansion operators (step 406). The matrix elements may be determined by performing measurements on one or more qubits subsequent to a quantum computation being performed. The measurements may be performed by control devices of the quantum hardware on one or more of the qubits of the quantum hardware. Corrected values of an output of the quantum computation are determined using the measured matrix elements, as described above with reference to FIG. 2A and FIG. 3A.

Implementations of the digital and/or quantum subject matter and the digital functional operations and quantum operations described in this specification can be implemented in digital electronic circuitry, suitable quantum circuitry or, more generally, quantum computational systems, in tangibly-embodied digital and/or quantum computer software or firmware, in digital and/or quantum computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. The term “quantum computational systems” may include, but is not limited to, quantum computers, quantum information processing systems, quantum cryptography systems, or quantum simulators.

Implementations of the digital and/or quantum subject matter described in this specification can be implemented as one or more digital and/or quantum computer programs, i.e., one or more modules of digital and/or quantum computer program instructions encoded on a tangible non-transitory storage medium for execution by, or to control the operation of, data processing apparatus. The digital and/or quantum computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, one or more qubits, or a combination of one or more of them. Alternatively or in addition, the program instructions can be encoded on an artificially-generated propagated signal that is capable of encoding digital and/or quantum information, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode digital and/or quantum information for transmission to suitable receiver apparatus for execution by a data processing apparatus.

The terms quantum information and quantum data refer to information or data that is carried by, held or stored in quantum systems, where the smallest non-trivial system is a qubit, i.e., a system that defines the unit of quantum information. It is understood that the term “qubit” encompasses all quantum systems that may be suitably approximated as a two-level system in the corresponding context. Such quantum systems may include multi-level systems, e.g., with two or more levels. By way of example, such systems can include atoms, electrons, photons, ions or superconducting qubits. In many implementations the computational basis states are identified with the ground and first excited states, however it is understood that other setups where the computational states are identified with higher level excited states are possible.

The term “data processing apparatus” refers to digital and/or quantum data processing hardware and encompasses all kinds of apparatus, devices, and machines for processing digital and/or quantum data, including by way of example a programmable digital processor, a programmable quantum processor, a digital computer, a quantum computer, multiple digital and quantum processors or computers, and combinations thereof. The apparatus can also be, or further include, special purpose logic circuitry, e.g., an FPGA (field programmable gate array), an ASIC (application-specific integrated circuit), or a quantum simulator, i.e., a quantum data processing apparatus that is designed to simulate or produce information about a specific quantum system. In particular, a quantum simulator is a special purpose quantum computer that does not have the capability to perform universal quantum computation. The apparatus can optionally include, in addition to hardware, code that creates an execution environment for digital and/or quantum computer programs, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

A digital computer program, which may also be referred to or described as a program, software, a software application, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a digital computing environment. A quantum computer program, which may also be referred to or described as a program, software, a software application, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and translated into a suitable quantum programming language, or can be written in a quantum programming language, e.g., QCL or Quipper.

A digital and/or quantum computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub-programs, or portions of code. A digital and/or quantum computer program can be deployed to be executed on one digital or one quantum computer or on multiple digital and/or quantum computers that are located at one site or distributed across multiple sites and interconnected by a digital and/or quantum data communication network. A quantum data communication network is understood to be a network that may transmit quantum data using quantum systems, e.g. qubits. Generally, a digital data communication network cannot transmit quantum data, however a quantum data communication network may transmit both quantum data and digital data.

The processes and logic flows described in this specification can be performed by one or more programmable digital and/or quantum computers, operating with one or more digital and/or quantum processors, as appropriate, executing one or more digital and/or quantum computer programs to perform functions by operating on input digital and quantum data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA or an ASIC, or a quantum simulator, or by a combination of special purpose logic circuitry or quantum simulators and one or more programmed digital and/or quantum computers.

For a system of one or more digital and/or quantum computers to be “configured to” perform particular operations or actions means that the system has installed on it software, firmware, hardware, or a combination of them that in operation cause the system to perform the operations or actions. For one or more digital and/or quantum computer programs to be configured to perform particular operations or actions means that the one or more programs include instructions that, when executed by digital and/or quantum data processing apparatus, cause the apparatus to perform the operations or actions. A quantum computer may receive instructions from a digital computer that, when executed by the quantum computing apparatus, cause the apparatus to perform the operations or actions.

Digital and/or quantum computers suitable for the execution of a digital and/or quantum computer program can be based on general or special purpose digital and/or quantum processors or both, or any other kind of central digital and/or quantum processing unit. Generally, a central digital and/or quantum processing unit will receive instructions and digital and/or quantum data from a read-only memory, a random access memory, or quantum systems suitable for transmitting quantum data, e.g. photons, or combinations thereof.

Elements of a digital and/or quantum computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and digital and/or quantum data. The central processing unit and the memory can be supplemented by, or incorporated in, special purpose logic circuitry or quantum simulators. Generally, a digital and/or quantum computer will also include, or be operatively coupled to receive digital and/or quantum data from or transfer digital and/or quantum data to, or both, one or more mass storage devices for storing digital and/or quantum data, e.g., magnetic, magneto-optical disks, optical disks, or quantum systems suitable for storing quantum information. However, a digital and/or quantum computer need not have such devices.

Digital and/or quantum computer-readable media suitable for storing digital and/or quantum computer program instructions and digital and/or quantum data include all forms of non-volatile digital and/or quantum memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; CD-ROM and DVD-ROM disks; and quantum systems, e.g., trapped atoms or electrons. It is understood that quantum memories are devices that can store quantum data for a long time with high fidelity and efficiency, e.g., light-matter interfaces where light is used for transmission and matter for storing and preserving the quantum features of quantum data such as superposition or quantum coherence.

Control of the various systems described in this specification, or portions of them, can be implemented in a digital and/or quantum computer program product that includes instructions that are stored on one or more non-transitory machine-readable storage media, and that are executable on one or more digital and/or quantum processing devices. The systems described in this specification, or portions of them, can each be implemented as an apparatus, method, or system that may include one or more digital and/or quantum processing devices and memory to store executable instructions to perform the operations described in this specification.

While this specification contains many specific implementation details, these should not be construed as limitations on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular implementations. Certain features that are described in this specification in the context of separate implementations can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable sub-combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a sub-combination or variation of a sub-combination.

Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the implementations described above should not be understood as requiring such separation in all implementations, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

Particular implementations of the subject matter have been described. Other implementations are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. 

What is claimed is:
 1. A method for correcting a result of a quantum computation, the method comprising: selecting a quantum error correcting code to perform the quantum computation, wherein the quantum error correcting code is defined by a respective set of stabilizer generators; determining a set of symmetry operators, comprising: selecting a subset of the set of stabilizer generators; determining, for each stabilizer generator in the selected subset, a sum between an identity operator and the stabilizer generator; and multiplying the determined sums together to form a summation of terms, wherein each term in the summation is equal to a respective symmetry operator; measuring a projective correction of a physical observable over an output quantum state of the quantum computation using the determined set of symmetry operators, wherein the physical observable corresponds to the result of the quantum computation; and determining a corrected result of the quantum computation using the measured projective correction of the physical observable.
 2. The method of claim 1, wherein measuring the projective correction of a physical observable over an output quantum state of the quantum computation using the determined set of symmetry operators comprises measuring P ^(†)ΓP where P represents a summation of the symmetry operators in the determined set of symmetry operators with uniform coefficients, and Γ represents the physical observable.
 3. The method of claim 1, wherein measuring a projective correction of a physical observable over an output quantum state of the quantum computation using the determined set of symmetry operators comprises: selecting one or more pairs of operators, wherein each pair comprises i) a respective component of the physical observable, and ii) a respective symmetry operator from the determined set of symmetry operators; for each selected pair of operators: performing the quantum computation on an initial quantum state to obtain the output quantum state, and measuring the selected pair of operators over the output quantum state to obtain a respective measurement result.
 4. The method of claim 3, wherein determining a corrected result of the output of the quantum computation comprises determining a corrected result of the output of the quantum computation using the obtained measurement results.
 5. The method of claim 4, wherein determining a corrected result of the output of the quantum computation using the obtained measurement results comprises computing a linear combination of the obtained measurement results.
 6. The method of claim 3, wherein selecting one or more pairs of operators comprises randomly sampling one or more pairs of operators according to a stochastic sampling scheme.
 7. The method of claim 1, wherein the result of the quantum computation comprises an expectation value of the physical observable.
 8. The method of claim 3, wherein the physical observable comprises a weighted sum of Pauli operators, and wherein components of the physical observable comprise Pauli operators in the sum of Pauli operators.
 9. The method of claim 3, wherein measuring a selected pair of operators over the output quantum state to obtain a respective measurement result comprises measuring Γ_(j)M_(k) over the output quantum state, wherein Γ_(i) represents the component of the physical observable in the selected pair and M_(k) represents the symmetry operator in the selected pair.
 10. The method of claim 1, wherein the size of the selected subset of the set of stabilizer generators is dependent on one or more of i) a target computation accuracy, or ii) a target computation cost.
 11. An apparatus comprising: quantum hardware; and one or more classical processors; wherein the apparatus is configured to perform operations comprising the methods claim
 1. 12. A method for correcting a result of a quantum computation, the method comprising: selecting a quantum error correcting code to perform the quantum computation, wherein the quantum error correcting code is defined by a respective set of stabilizer generators; selecting a linear combination of stabilizer operators generated by the stabilizer generators; determining values of coefficients of the stabilizer operators in the linear combination, comprising solving a generalized eigenvalue problem for a corresponding quantum error correcting code Hamiltonian; measuring an expansion correction of a physical observable over an output quantum state of the quantum computation using the stabilizer operators in the linear combination of stabilizer operators, wherein the physical observable corresponds to the result of the quantum computation; and determining a corrected result of the quantum computation using the measured expansion correction of the physical observable and the determined values of the coefficients of the stabilizer operators in the linear combination.
 13. The method of claim 12, wherein solving the generalized eigenvalue problem comprises: preparing multiple copies of an output quantum state of the quantum computation; measuring components of the quantum error correcting code Hamiltonian over respective copies of the output quantum state; measuring components of an overlap matrix for the stabilizer operators over respective copies of the output quantum state; determining a matrix of eigenvalues and a matrix of eigenvectors using the measured components of the quantum error correcting code Hamiltonian and measured components of an overlap matrix for the stabilizer operators.
 14. The method of claim 12, wherein measuring an expansion correction of a physical observable over an output quantum state of the quantum computation using the stabilizer operators in the linear combination of stabilizer operators comprises measuring respective M_(i) ^(†)ΓM_(j) over the output quantum state to obtain corresponding measurement results, wherein Γ represents the physical observable and M_(k) represents a stabilizer operator.
 15. The method of claim 14, wherein determining a corrected result of the quantum computation using the measured expansion correction of the physical observable and the determined values of the coefficients of the stabilizer operators in the linear combination comprises: summing the measurement results, wherein each measurement result in the sum is multiplied by a respective determined coefficient.
 16. The method of claim 12, wherein the result of the quantum computation comprises an expectation value of the physical observable.
 17. The method of claim 12, wherein the physical observable comprises a weighted sum of Pauli operators, and wherein components of the physical observable comprise Pauli operators in the sum of Pauli operators.
 18. The method of claim 1 wherein the quantum code comprises a stabilizer code, surface code, the Shor code, the Bacon-Shor code, or toric code.
 19. The method of claim 1 wherein the quantum computation is performed using a noisy intermediate scale quantum computer.
 20. An apparatus comprising: quantum hardware; and one or more classical processors; wherein the apparatus is configured to perform operations comprising the methods of claim
 12. 21. A method for correcting a result of a quantum computation represented by a problem Hamiltonian, the method comprising: identifying a set of known symmetry operators for the problem Hamiltonian; generating a set of expansion operators, comprising: for each symmetry operator, determining a sum between the identity operator and the symmetric operator; and multiplying the determined sums together to form a summation of terms, wherein each term in the summation is equal to a respective expansion operator; measuring matrix elements of some or all of the expansion operators in the generated set; and determining corrected values of an output of the quantum computation using the measured matrix elements.
 22. The method of claim 21, wherein the symmetry operators in the identified set of approximate symmetry operators comprise operators that do not commute with the problem Hamiltonian.
 23. The method of claim 21, wherein the set of known symmetry operators comprise operators with two distinct eigenvalues.
 24. The method of claim 21, wherein the method further comprises identifying a set of approximate symmetry operators for the problem, and wherein generating a set of expansion operators comprises: for each symmetry operator and for each approximate symmetry operators, determining a sum between the identity operator and the symmetric operator or approximate symmetry operator; and multiplying the determined sums together to form a summation of terms, wherein each term in the summation is equal to a respective expansion operator.
 25. An apparatus comprising: quantum hardware; and one or more classical processors; wherein the apparatus is configured to perform operations for correcting a result of a quantum computation represented by a problem Hamiltonian, the operations comprising: identifying a set of known symmetry operators for the problem Hamiltonian; generating a set of expansion operators, comprising: for each symmetry operator, determining a sum between the identity operator and the symmetric operator; and multiplying the determined sums together to form a summation of terms, wherein each term in the summation is equal to a respective expansion operator; measuring matrix elements of some or all of the expansion operators in the generated set; and determining corrected values of an output of the quantum computation using the measured matrix elements. 